from config import driver
from my_config import STEPS


@STEPS.step('login')
def login(driver:driver, step:dict) -> None:

    name_input = driver.find_element_by_xpath('//*[@id="app"]/div/div/div[1]/div[2]/div[3]/div[1]/div[2]/input')
    name_input.send_keys(step['phone'])

    pwd_input = driver.find_element_by_xpath('//*[@id="app"]/div/div/div[1]/div[2]/div[3]/div[2]/div[2]/div/input')
    pwd_input.send_keys(step['pwd'])

    driver.find_element_by_xpath('//*[@id="app"]/div/div/div[1]/div[2]/div[3]/div[3]/div[2]/input').click()
